package it.fuzzylogics.gwt.geolocation.client.core;

/**
 * Created by IntelliJ IDEA.
 * User: hrothgar
 * Date: Jul 6, 2009
 * Time: 8:24:53 PM
 * To change this template use File | Settings | File Templates.
 */


/**
interface PositionOptions {
  attribute boolean enableHighAccuracy;
  attribute long timeout;
  attribute long maximumAge;
};
*/

 public class PositionOption {

    String enableHighAccuracy=new String();
    String timeout=new String();
    String maximumAge=new String();

     public PositionOption() {

    }

     public PositionOption(String enableHighAccuracy, String timeout, String maximumAge) {
        this.enableHighAccuracy = enableHighAccuracy;
        this.timeout = timeout;
        this.maximumAge = maximumAge;
    }

     public String isEnableHighAccuracy() {
        return enableHighAccuracy;
    }

     public void setEnableHighAccuracy(String enableHighAccuracy) {
        this.enableHighAccuracy = enableHighAccuracy;
    }

     public String getTimeout() {
        return timeout;
    }

     public void setTimeout(String timeout) {
        this.timeout = timeout;
    }

     public String getMaximumAge() {
        return maximumAge;
    }

     public void setMaximumAge(String maximumAge) {
        this.maximumAge = maximumAge;
    }

     public String toString(){
        String ret="{";

        if(!enableHighAccuracy.isEmpty())
            ret+="enableHighAccuracy:"+enableHighAccuracy+",";

        if(!timeout.isEmpty())
            ret+="timeout:"+timeout+",";

        if(!maximumAge.isEmpty())
            ret+="maximumAge:"+maximumAge;

        if(ret.endsWith(","))
            ret=ret.substring(0, ret.length()-1);

        ret+="}";

        return ret;
    }
}
